cmake_minimum_required(VERSION 3.16)

aux_source_directory(. SRC_LIST)
include_directories(${CMAKE_SOURCE_DIR}/include/visionhw)

add_library(visionhw SHARED ${SRC_LIST})

find_package(OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )
target_link_libraries( visionhw ${OpenCV_LIBS} )

set(BOOST_ROOT /usr/local/boost)
find_package(Boost COMPONENTS json thread system REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries (visionhw ${Boost_LIBRARIES} pthread)

find_package(PCL REQUIRED)
set(BOOST_ROOT /usr/local/boost)
include_directories(${PCL_INCLUDE_DIRS})
target_link_libraries(visionhw ${PCL_LIBRARIES})

find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP jsoncpp)
include_directories(${JSONCPP_INCLUDE_DIRS})
target_link_libraries(visionhw ${JSONCPP_LIBRARIES})
message(STATUS ${JSONCPP_INCLUDE_DIRS})
message(STATUS ${JSONCPP_LIBRARIES})